﻿<view:UCModule x:Class="UCOLOR.View.ProductListViewDemo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
    xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
    xmlns:helpers="clr-namespace:UCOLOR.Helpers" 
    xmlns:local="clr-namespace:UCOLOR.App.Extend"
    
    xmlns:view="clr-namespace:UColor.WPF"
             mc:Ignorable="d" 
             d:DesignHeight="800" d:DesignWidth="1118" FontWeight="Bold" Focusable="True" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars">
    <view:UCModule.Resources>
        <local:ScalablePaddingConverter x:Key="ScalablePaddingConverter"/>
        <helpers:StringFormatConverter x:Key="StringFormatConverter" />
        <helpers:ImageSourceConverter x:Key="ImageSourceConverter" />
        <Style x:Key="VerticalTile" TargetType="local:TileEx">
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="Size" Value="Small" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate />
                </Setter.Value>
            </Setter>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel>
                            <Image Source="{Binding}" Stretch="None" />
                            <TextBlock Text="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=dxlc:Tile}}" FontSize="14" Margin="0,5,0,0" HorizontalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="HorizontalTile" TargetType="local:TileEx">
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="Size" Value="Large" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate />
                </Setter.Value>
            </Setter>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="{Binding}" Stretch="None" />
                            <TextBlock Text="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=dxlc:Tile}}" FontSize="14" Margin="20,0,0,0" VerticalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="FlatTile" TargetType="local:TileEx">
            <Setter Property="Size" Value="Large" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="VerticalHeaderAlignment" Value="Stretch" />
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel>
                            <Image Source="{Binding}" Stretch="None" />
                            <TextBlock Text="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=dxlc:Tile}}" FontSize="24" Margin="0,5,0,0" HorizontalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <DataTemplate x:Key="ToolTipDataTemplate">
            <Image Stretch="Fill"  Source="{Binding PhotoSource}" />
        </DataTemplate>
        <ControlTemplate x:Key="ToolTipTemplate" TargetType="{x:Type ToolTip}">
            <Grid>
                <Grid Opacity="0.6">
                    <Border>
                        <!--<Border.Effect>
                        <DropShadowEffect Direction="-90" ShadowDepth="1" BlurRadius="7" Opacity="0.75"/>
                    </Border.Effect>-->
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF9EA3C1" Offset="0" />
                                <GradientStop Color="#FF686C81" Offset="1" />
                            </LinearGradientBrush>
                        </Border.Background>
                        <Border Margin="1" Padding="12,12,2,12">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF565A71" Offset="0" />
                                    <GradientStop Color="#FF323441" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                    </Border>
                </Grid>
                <Border BorderThickness="1" Margin="12" Padding="1">
                    <Border BorderThickness="1" Margin="0" Padding="0">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF2F313E" Offset="0" />
                                <GradientStop Color="#FF2F313E" Offset="1" />
                            </LinearGradientBrush>
                        </Border.Background>
                        <Border BorderBrush="#FF414352" BorderThickness="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,0,0,0" MaxWidth="300" MaxHeight="600">
                            <ContentPresenter />
                        </Border>
                    </Border>
                </Border>
            </Grid>
        </ControlTemplate>
    </view:UCModule.Resources>
    <view:DemoModuleControl>
    <Grid Name="Center" Background="#FFFFFFFF" Height="auto" >
        <Border BorderBrush="#FF515151" BorderThickness="1" Margin="2,2,2,2" Padding="1">
            <dxlc:TileLayoutControl x:Name="DirList"  Margin="3,3,3,3" AllowItemMoving="True" Orientation="Vertical" Padding="0" BreakFlowToFit="True" ItemsSource="{Binding data}">
              
            </dxlc:TileLayoutControl>
        </Border>
    </Grid>
    </view:DemoModuleControl>
</view:UCModule>
